﻿using System.Timers;

namespace Controller
{
	class PlayerSmartComputer : AbstractPlayer
	{
		protected ReversiController reversi;

		public PlayerSmartComputer(int id, Token token, ReversiController reversi, bool timerEnabled, double timerInterval)
			: base(id, token, timerEnabled, timerInterval)
		{
			this.reversi = reversi;
		}

		protected override void MakeMove(object sender, ElapsedEventArgs e)
		{
			Index index = reversi.GetSmartPosition();
			reversi.PlaceToken(index.Column, index.Row, this.GetType());
		}
	}
}
